1. Technical Field
The present invention is directed generally toward the creation of dynamic web pages. More specifically, the present invention is directed toward a system for rendering web pages from data stored in a databases or text files and storing the web pages for later retrieval by a web server.
2. Description of Related Art
Since the introduction of the World Wide Web and the subsequent commercialization of the Internet, the world has become a considerably more connected place. No longer bound to the primitive communications interfaces of the past, the Internet is now host to a variety of powerful communications media, including interactive hypertext browsing (the World Wide Web), instant messaging, streaming video and audio, and multimedia electronic mail.
Hypertext is a method of organizing textual and graphical information on a computer screen. Information is organized into “pages,” which resemble printed pages in a book or (perhaps more accurately) printed scrolls (since a hypertext page can be of any length). The primary difference between hypertext and the printed word, however, lies in the fact that hypertext pages can contain links. That is, a portion of a hypertext document, such as a phrase or a graphic, may be made sensitive to clicking by the mouse such that when the user clicks on that portion, the user is directed to a new page or a different section of the current page. For instance, it is a common practice to make bibliographic citations into links. When a user clicks on one of these citations, the cited text appears on the screen. Hypertext documents are displayed using a program called a “browser.”
The largest and best-known repository of hypertext documents is the World Wide Web, a loosely bound collection of publicly accessible hypertext documents stored on computers the world over. The World Wide Web has become the preferred Internet medium for publishable information as well as for providing such interactive features as online shopping—to the extent that the terms Internet and World Wide Web are virtually synonymous to some.
Browsers can download hypertext documents from a server with the HyperText Transfer Protocol (HTTP). HTTP allows a browser to request documents or files from a server and receive a response. In addition, when browser users enter information into a form embedded into a hypertext page, the browser transmits the information to a server using HTTP. Form information can then be passed along to applications residing on the server by way of the Common Gateway Interface (CGI). Those applications can then return a result, which may be written in HTML.
CGI is a very versatile and powerful tool for developing web applications. CGI programs take in information from “standard input” and through operating system environment variables. CGI programs return an output through “standard output.” Almost all computer languages support some kind of “standard input” and “standard output.” Many, if not most CGI programs, however, are written in Perl or some other similar scripting language, since these languages tend to have rather powerful string-processing capabilities, require no compiling, and come complete with an arsenal of weakly-typed abstract data structures (e.g., lists, hash tables, etc.).
With all its power and versatility, however, CGI does have some limitations. Because CGI programs generally create the web pages they output, it is often necessary to modify a CGI program simply to change a cosmetic detail in its output. This modification can be difficult to do, since one must comb through lines of code in order to find the portion that actually renders the display. To complicate matters, a CGI program containing conditional branches may, in fact, contain two or more portions of code to perform the same rendering. This is at best an inconvenience to CGI programmers and at worst a nightmare to non-programmer web designers.
A number of products exist to simplify the creation of web pages with dynamic data. Server-side scripting languages such as Microsoft Active Server Pages (ASP), from Microsoft, Inc., and PHP, which is freely-available, allow for the inclusion of server-side program code within HTML document files. These products work by having a web server or other pre-processor execute the code and render a result, which is incorporated into the HTML page and transmitted to the client. These server-side scripting tools may be used in conjunction with a database and can thus be used to render data from a database in an HTML page without a programmer's having to create a CGI program. ASP, PHP, and products like them keep the program code from obscuring the structure and flow of an HTML page, since ASP and PHP code are embedded into the HTML page, rather than the HTML being embedded into a CGI program. In this way, these server-side scripting tools allow web designers who have no programming knowledge to easily examine and edit the aesthetic features of an HTML page while leaving the programming details to the programmers.
These server-side scripting languages are not without some drawbacks, however. Firstly, most server-side scripting languages are procedural. That is, they contain flow control instructions for making loops and conditional branches. A server-side script may include, for example, a loop that renders a repeated HTML feature. In such cases, the separation between programming code and HTML data is blurred. Secondly, server-side scripting still requires program code to be developed for retrieving and rendering dynamic data. It would be better if the dynamic data could be rendered with a minimum of programming. Thirdly, server-side scripting can cause web server performance to degrade. Executing the embedded code each time a page is retrieved from the server means that the server must perform much more computation on each web transaction. This clearly affects the performance of the server.
What is needed, then, is a method of rendering dynamic data in a web environment that requires little or no programmer intervention and that does not impose the performance demands of on-the-fly rendering, as provided by server-side scripting languages.